package com.xbongbong.pro.statistic.model;

import com.xbongbong.pro.domain.entity.BiProWareEntity;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * @author 梁鲁江
 * @version v1.0
 * @date 2019/3/20 10:16
 * @since v1.0
 */
public interface BiProWareModel {
     Integer insert(BiProWareEntity entity);

     Integer update(BiProWareEntity entity);

     Integer save(BiProWareEntity entity);

     void insertBatch(List<BiProWareEntity> entityList);

     Integer deleteByKey(Long key, String corpid);

     BiProWareEntity getByKey(Long key, String corpid);

     List<BiProWareEntity> findEntitys(Map<String, Object> param);

     Integer getEntitysCount(Map<String, Object> param);

    /**
     * 把所有的isDone都置为0
     * @param key
     * @param corpid
     * @return
     */
     Integer updateIsDoneByKey(Long key, String corpid) ;

    /**
     * 根据id更新updateTime
     * @param key
     * @param corpid
     * @return
     */
     Integer updateTimeByKey(Long key, String corpid) ;

    /**
     * 对传入的id的del设置为1
     * @param idIn
     * @return
     */
    Integer deleteAll(Set<Long> idIn);
}
